<%@page import="java.util.UUID"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/pages/common/taglib.jsp" %>
<%
    String uuid = UUID.randomUUID().toString();
    request.setAttribute("uuid", uuid);
%>
<form id="flowGridSd_${uuid}" style="display: none;" class="box-body form-float"></form>
<form id="flowNodeGridSd_${uuid}" style="display: none;" class="box-body form-float"></form>
<form id="flowNodeRelGridSd_${uuid}" style="display: none;" class="box-body form-float"></form>
<div class="box box-primary">
<div class="row">
	<div class="col-md-4">
		<div class="box-header with-border">
			<h3 class="box-title">请选择流程
			</h3>
			<div class="box-tools pull-right" id="flowGridTb_${uuid}">
			</div>
		</div>
		<div class="box-body">
			<table id="flowGrid_${uuid}" >
	   		</table>
		</div>
	</div>
	<div class="col-md-4">
		<div class="box-header with-border">
			<h3 class="box-title">请选择流程
			</h3>
			<div class="box-tools pull-right" id="flowNodeGridTb_${uuid}">
			</div>
		</div>
		<div class="box-body">
			<table id="flowNodeGrid_${uuid}" >
	   		</table>
		</div>
	</div>
	 
	<div class="col-md-4">
		<div class="box-header with-border">
			<h3 class="box-title">请选择流程
			</h3>
			<div class="box-tools pull-right" id="flowNodeRelGridTb_${uuid}">
			</div>
		</div>
		<div class="box-body">
			<table id="flowNodeRelGrid_${uuid}" >
	   		</table>
		</div>
	</div>
	 
</div>
</div>

<script type="text/javascript">
$(function(){
	var uuid = '${uuid}';
	
	requirejs(['wiseMen/dataModel/QueryDefTpl'],function(QueryDefTpl){
		var flowGrid=new QueryDefTpl({
			code:"DM_WORKFLOW_DEFINITION",
			searchBarType:"dialog",
			selectModel:"single",
			searchDiv:"#flowGridSd_"+uuid,//查询定义栏
			toolBarDiv:"#flowGridTb_"+uuid,//工具栏定义栏
			gridDiv:"#flowGrid_"+uuid,//grid表格
			onSelect:function(row){
				flowNodeGrid.search({
					LCBH:row.ID
				});
				flowNodeRelGrid.search({
					LCBH:row.ID
				});
				$(".box-title").html(row.LCMC);
			}
		});
		
		var flowNodeGrid=new QueryDefTpl({
			code:"DM_WORKFLOW_NODE",
			searchBarType:"dialog",
			selectModel:"single",
			searchDiv:"#flowNodeGridSd_"+uuid,//查询定义栏
			toolBarDiv:"#flowNodeGridTb_"+uuid,//工具栏定义栏
			gridDiv:"#flowNodeGrid_"+uuid,//grid表格
			queryDatas:{LCBH:'-1'}
		});
		
		var flowNodeRelGrid=new QueryDefTpl({
			code:"DM_WORKFLOW_NODE_RELATION",
			searchBarType:"dialog",
			selectModel:"single",
			searchDiv:"#flowNodeRelGridSd_"+uuid,//查询定义栏
			toolBarDiv:"#flowNodeRelGridTb_"+uuid,//工具栏定义栏
			gridDiv:"#flowNodeRelGrid_"+uuid,//grid表格
			queryDatas:{LCBH:'-1'}
		});
		
	});
});
</script><div style="cursor: pointer;font-weight: bold;color: "></div>